package cn.com.cym.gamezao.repository.xmu.recruit;

import cn.com.cym.gamezao.base.BaseRepository;
import cn.com.cym.gamezao.entity.authorize.User;
import cn.com.cym.gamezao.entity.recruit.Job;
import cn.com.cym.gamezao.entity.xmu.recruit.UserApply;
import cn.com.cym.gamezao.enums.ApplyStatus;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.stereotype.Repository;

@RedisHash
@Repository
public interface UserApplyRepository extends BaseRepository<UserApply,Long> {

    UserApply findByJobAndUser(Job job, User user);

    Page<UserApply> findAllByUserAndApplyStatus(Pageable pageable, User user, ApplyStatus applyStatus);

    Page<UserApply> findAllByUser(Pageable pageable, User user);
}
